﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Frame.Lib.Core.Register;
using Frame.Lib.Core.Config;
using System.Xml.Linq;

namespace Frame.Lib.Core.Cache.SysConfig
{
    public class SysConfigContainer 
    {
        public Dictionary<string, SysConfigInfo> SysConfigs
        {
            get;
            set;
        }

        public RegisterInfo RegisterInfo
        {
            get;
            set;
        }



        public override string ToString()
        {
            XElement root = new XElement("SysConfigContainer");

            foreach (SysConfigInfo info in SysConfigs.Values)
            {
                XElement ele = new XElement("SysConfigs");
                ele.Add(new XAttribute("ID", info.ID));
                ele.Add(new XAttribute("Config", info.Config));

                root.Add(ele);
            }


            return root.ToString();
        }
    }
}
